﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ErrrorPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var objex = (Exception)HttpContext.Current.Application.Get("lastExt");
        if (objex.InnerException != null)
        {
            lblMessage.Text = objex.InnerException.Message;
        }
        else
        {
            lblMessage.Text = objex.GetBaseException().Message;
        }
            
        Server.ClearError();

        if (string.IsNullOrEmpty(lblMessage.Text))
        {
            lblMessage.Text = "Bạn không có quyền phê duyệt form này.";
        }
    }
}